home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
A-COMAL Series
/
(k)aae.d64
/
1000primes.basic
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-28
|
258b
|
18 lines
10 S=TIME
20 SZ%=3962 : C%=0
30 DIM FL%(SZ%)
40 FOR I=0 TO SZ%
50 IF FL%(I)<>0 THEN 210
60 PR%=I +I +3
65 PRINT PR%;
70 K%=I +PR%
80 IF K%>SZ% THEN 120
90 FL%(K%)=1
100 K%=K%+PR%
110 GOTO 80
120 C%=C%+1
210 NEXT I
300 E=TIME
310 PRINT "COUNT=";C%
320 PRINT "TIME=";(E-S)/60